package com.odyssey.main;

import com.odyssey.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.WindowManager.LayoutParams;

public class AboutActivity extends Activity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
    //make dialog non-modal, so other views can receive touch events
      getWindow().setFlags(LayoutParams.FLAG_NOT_TOUCH_MODAL, LayoutParams.FLAG_NOT_TOUCH_MODAL);
      //watch for touch outside dialog
      getWindow().setFlags(LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH, LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH);
      //set layout, now that flags are set
      setContentView(R.layout.about);
  }
  
  public boolean onTouchEvent(MotionEvent event)
  {
    //if the user has touched outside dialog area,finish activity
    if(MotionEvent.ACTION_OUTSIDE == event.getAction())
    {
      finish();
      return true;
    }
    //let activity handle everything else
    return super.onTouchEvent(event);
  }
}